1. Technical Field
The present invention relates to a musical tone reproducing apparatus and a musical tone reproducing method which can be suitably applied to portable terminal apparatuses to generate melody tones.
2. Background Art
Conventional musical tone reproducing apparatuses include a type which generates musical tones using hardware.
FIG. 13 shows an example of the construction of a conventional musical tone reproducing apparatus of this type. In FIG. 13, a CPU (Central Processing Unit) 110 controls supply of music contents data 111, such as MIDI (Musical Instrument Digital Interface) data and SMAF (Synthetic Music Mobile Application Format) data, hereinafter described, to a tone generator hardware section 15. In this case, the MIDI data and SMAF data are transferred from external apparatuses or read from storage means. The tone generator hardware section 115 is comprised of a sequencer 132, and a tone generator 133. The sequencer 132 is comprised of a decoder 132a that converts sequence data such as MIDI data or SMAF data into control data having a format peculiar to the tone generator 133, and a time management section 132b that controls musical tone reproduction time according to time management information contained in the control data. In the musical tone reproducing apparatus constructed as above, in reproduction of musical tones, the time management section 132b gives the decoder 132a instructions to output the control data for reproduction of musical tones, in timing based on duration data indicative of time intervals between events contained in the control data and gate time data indicative of sounding time periods. In response to the instructions, the decoder 132a outputs the control data to the tone generator 133. The tone generator 133 in turn generates and outputs musical tones based on the supplied control data. Thus, musical tones are reproduced.
In the conventional musical tone reproducing apparatus, the sequencer 132 carries out conversion of the music contents data and time management. Therefore, in the case where many events occur at the same time, for example, the processing capacity of the sequencer 132 increases, which can result in inability to complete processing of the data for all the events in a unit time. For example, how the processing is carried out will be described with reference to FIG. 14 in which absolute time elapsed during musical tone reproduction is shown on the abscissa. In FIG. 14, reference numerals (1) to (4) represent events which are processed by the sequencer 132. An event (1), to which duration data “1” is allotted, is to be processed in timing of absolute time “1”, an event (2) following the event (1), to which duration data “1” is allotted, is to be processed in timing of absolute time “2”, is to be processed in timing of absolute time, an event (3) following the event (2), to which duration data “1” is allotted, is to be processed in timing of absolute time “3”, and an event (4) following the event (3), to which duration data “5” is allotted, is to be processed in timing of absolute time “8”. If the processing is properly carried out in accordance with the above-mentioned timing, musical tones are reproduced and sounded by the tone generator 188 in proper timing in accordance with the contents of the sequence data. The absolute times are set in terms of unit time.
However, if it takes much time to carry out processing of the event (1) so that the processing of this event cannot be completed within the unit time and is completed after the absolute time “2”, as indicated as (1)′ in a lower part of FIG. 14, the event (2) to be processed in timing of the absolute time “2” is processed in timing of the absolute time “3”, the event (3) to be processed in timing of the absolute time “3” is processed in timing of the absolute time “4”, and the event (4) to be processed in timing of the absolute time “8” is processed in timing of the absolute time “9”. Thus, the events that cannot be completely processed within the respective unit times are processed in delayed timing. Consequently, if an event cannot be completely processed within the unit time, the corresponding control data is supplied to the tone generator 133 in timing delayed from the time point at which the control data should be properly supplied to the tone generator 133, and accordingly sounding timing of subsequent musical tones is delayed. Mobile phones in particular have a function of displaying images in synchronism with incoming call music, and a function of vibrating the casing of the phone and/or lighting on/off various buttons in synchronism with incoming call music. In performing such functions, if the sounding timing of musical tones is delayed, the functions are performed out of synchronism with incoming call music.
It is therefore an object of the present invention to provide a musical tone reproducing apparatus and a musical tone reproducing method which are capable of recovering proper timing of musical tone generation even in a situation where processing of events takes much time such that the sounding timing of musical tones is delayed, and a portable terminal apparatus having the musical tone reproducing apparatus.